package com.gator.desig_mode.builder;



/**
 * @author 何章怀晓 hezhanghuaixiao
 * @version V1.0
 * @desc
 */
public class HouseDirector {

  private AbstractHouseBuilder abstractHouseBuilder;

  public HouseDirector(AbstractHouseBuilder abstractHouseBuilder) {
    this.abstractHouseBuilder = abstractHouseBuilder;
  }

  public House builder(String lay,String frame,String capp) {
    //指挥者自定义先后顺序,构建生产过程
    abstractHouseBuilder.layingFoundation(lay);
    abstractHouseBuilder.frame(frame);
    abstractHouseBuilder.capping(capp);
    return abstractHouseBuilder.build();
  }

}
